IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[or_UserProfileSelect]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.[or_UserProfileSelect]
Go

CREATE  PROCEDURE  dbo.[or_UserProfileSelect]  
	@UserID			int = null

AS  
  
BEGIN TRY 

SELECT
UserProfileID, 
MeMaUserID, 
Picture, 
MentorStatusTypeID, 
MentorRating, 
LinkedInLink, 
FacebookLink, 
TwitterHandle, 
PersonalWebsite, 
Summary, 
LastModDate, 
CreatedDate
FROM  UserProfile

WHERE  MeMaUserID = ISNULL(MeMaUserID,@UserID)
 
 

END TRY
BEGIN CATCH
   

END CATCH
  